﻿using strange.extensions.mediation.impl;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class IntergrationView : View {

    public Button But_Deal;
    public Button But_Grab;
    public Button But_DisGrab;
    public Button But_Pass;
    public Button But_Play;

    /// <summary>
    /// 隐藏全部按钮
    /// </summary>
    public void DeActiveAll()
    {
        But_Deal.gameObject.SetActive(false);
        But_Grab.gameObject.SetActive(false);
        But_DisGrab.gameObject.SetActive(false);
        But_Pass.gameObject.SetActive(false);
        But_Play.gameObject.SetActive(false);
    }
    /// <summary>
    /// 显示发牌按钮
    /// </summary>
    public void ActiveDeal()
    {
        But_Deal.gameObject.SetActive(true);
        But_Grab.gameObject.SetActive(false);
        But_DisGrab.gameObject.SetActive(false);
        But_Pass.gameObject.SetActive(false);
        But_Play.gameObject.SetActive(false);
    }
    /// <summary>
    /// 显示抢地主按钮
    /// </summary>
    public void ActiveGrab()
    {
        But_Deal.gameObject.SetActive(false);
        But_Grab.gameObject.SetActive(true);
        But_DisGrab.gameObject.SetActive(true);
        But_Pass.gameObject.SetActive(false);
        But_Play.gameObject.SetActive(false);
    }
    public void ActivePlayAndPass(bool CanPass)
    {
        But_Deal.gameObject.SetActive(false);
        But_Grab.gameObject.SetActive(false);
        But_DisGrab.gameObject.SetActive(false);
        But_Pass.gameObject.SetActive(true);
        But_Pass.interactable = CanPass;
        But_Play.gameObject.SetActive(true);
    }
}
